package com.xiaodu.springboot.ex;

/**
 * @author: dutianjie
 * @date: 2021/4/7
 * @version: v1.0.0
 * @description: 描述
 **/
public class BusinessException extends RuntimeException{

    private int code = 500;

    private String msg;


    public BusinessException(){
        super();
    }

    public BusinessException(String message) {
        super(message);
        this.msg = message;
    }

    public BusinessException(String message, Throwable e) {
        super(message, e);
        this.msg = message;
    }

    public BusinessException(String message, int code, Throwable e) {
        super(message, e);
        this.msg = message;
        this.code = code;
    }

    public BusinessException(String message, int code) {
        super(message);
        this.code = code;
        this.msg = message;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
